#!/bin/bash

export DISPLAY=:0.0
export XDG_RUNTIME_DIR=/run/user/0
export QT_QPA_FONTDIR=/usr/share/fonts/ttf
echo in $0, my pid is $$
hasweston=`ps -ef | grep weston-desktop | grep /usr | awk '{print $4}'`
declare -i i=1
while (( $i < 10 &&  "${hasweston:-NULL}" == "NULL" ))
do
        sleep 1
        hasweston=`ps -ef | grep weston-desktop | grep /usr | awk '{print $4}'`
        let ++i
done
/home/root/QtAppDemo -platform wayland &
